/**
 * Created with IntelliJ IDEA.
 * User: Alex
 * Date: 12.04.14
 * Time: 19:29
 * To change this template use File | Settings | File Templates.
 */
function newPage(){
     var newWin = open('','_blank',innerWidth = 300);
   // newWin.document.open();
    var name = document.getElementById("name").value;
    var message = document.getElementById("text").value;
    var birthdate = document.getElementById("dateDefault").value;
    var company;
    if (document.getElementById("RadioCompany").checked) {
        company = document.getElementById("company").value;
        newWin.document.write("name: "+name + ", message: "+message + ", company: "+company + ", birthdate " + birthdate);

    } else
    {
        newWin.document.write("name: "+name + ", message: "+message+ ", birthdate " + birthdate);

    }

    console.log("name: "+name + ", message: "+message + ", company: "+company + ", birthdate " + birthdate);
    newWin.document.close();


}